Add Tap to Add button in card form#12299
Conversation
|
Diffuse output: APKDEXARSC |
30f1989 to
7667c3a
Compare
| ScanCardButtonUI( | ||
| enabled = enabled, | ||
| cardScanGoogleLauncher = cardScanLauncher | ||
| ) |
There was a problem hiding this comment.
There's a large refactor here we can do for Scan card but it requires the foundations from this PR and a follow up PR. It's a relatively expensive engineering refactor but we should create a task to do it to make ScanCard a CardDetailsAction.
|
Will also fix the strings task once approved! |
|
|
||
| fun shouldAutomaticallyLaunchCardScan(): Boolean { | ||
| return automaticallyLaunchedCardScanFormDataHelper?.shouldLaunchCardScanAutomatically == true | ||
| return cardDetailsAction == null && |
There was a problem hiding this comment.
why would we want to prevent launching card scan in this case? My expectation would be for TTA and automatically launching card scan to be very separate features
It would probably be confusing if someone wanted to launch card scan automatically and then enabling TTA prevented that from happening
There was a problem hiding this comment.
It's because TTA will be launching automatically instead of card scan. This is implemented in #12300.
| } | ||
|
|
||
| @Test | ||
| fun `createFormElements has null cardDetailsAction when tap to add is not supported`() { |
There was a problem hiding this comment.
these tests feel a bit like they are testing implementation details -- why exactly do we care about this being null specifically? do we want a certain form element to be shown or not? could we test for that instead?
There was a problem hiding this comment.
This is actually testing to ensure we have no card details action if tap to add is not supported which should be the case. In a future refactor, this would be replaced by either card scan or tap to add.
Summary
Add Tap to Add button in card form
Motivation
Allows for launching Tap to Add from the card form
Testing